Skip to content

Improve MWCC class unique ID normalization; normalize on the demangled name - #411

Merged
LagoLunatic merged 3 commits into
encounter:mainfrom
LagoLunatic:normalize-demangled
Oct 19, 2026
Merged

LagoLunatic merged 3 commits into
encounter:mainfrom
LagoLunatic:normalize-demangled

Conversation

@LagoLunatic

@LagoLunatic LagoLunatic commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes three issues with MWCC class unique ID normalization for symbol pairing:

  • Previously only anonymous classes were supported, now named classes are also supported
  • Multiple unique IDs within a single symbol are now all normalized (e.g. for function parameters)
  • The length of the unique ID being different on the left vs right is now ignored (previously, $132966 and $55068 would not have been recognized as the same)

The third issue is difficult to fix on the mangled name, as the length of the name is included within the symbol, so I switched it to normalize and compare on the demangled version of the name, which does not include these lengths. This is inconsistent with how the mangled name is usually used for comparisons in all other cases in objdiff. However, it's a simpler solution than trying to fix the mangled name lengths, as that requires duplicating a large chunk of demangler logic within objdiff (#410).

Only downside I'm aware of here is that if the demangler ever failed to work on one of these symbols for some reason, the normalization would also not happen either then.

@LagoLunatic
LagoLunatic merged commit e5c0c43 into encounter:main Oct 19, 2026
23 checks passed
@LagoLunatic
LagoLunatic deleted the normalize-demangled branch October 19, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant